package com.sie.framework.constconfig;

/**
 * Created by zhq on 2015/11/27.
 */
public class ErrorDefine {

    public final static int BLUE_DEVICE_NULL = 1;
    public final static int BLUE_CONN_ERR = 2;
    public final static int BLUE_NO_PAIR = -10002;
    public final static int SEND_NEED_PARAMETERS = -10003;
    public final static int NEED_CONN_FIRST = -10004;
    public final static int ERR_SEND_REQ_FAILED = -10005;
    public final static int ERR_RECEIVE_RSP_FAILED = -10006;

    public final static int SERIAL_OPEN_FAIL = -10007;
    public final static int SERIAL_DISCONN    = -10008;
    public final static int SERIAL_NULL    = -10009;
    public final static int SERIAL_SEND_FAIL    = -10010;
    public final static int SERIAL_NEED_CONTEXT    = -10011;
    public static String  getErrorDescribe(int error){
    	String describe = null;
        switch (error) {
            case BLUE_DEVICE_NULL:
                describe = "BLUE_DEVICE_NULL";
                break;
            case BLUE_CONN_ERR:
                describe = "BLUE_CONN_ERR";
                break;
            case BLUE_NO_PAIR:
                describe = "BLUE_NO_PAIR";
                break;
            case SEND_NEED_PARAMETERS:
                describe = "SEND_NEED_PARAMETERS";
                break;
            case NEED_CONN_FIRST:
                describe = "NEED_CONN_FIRST";
                break;
            case ERR_SEND_REQ_FAILED:
                describe = "ERR_SEND_REQ_FAILED";
                break;
            case ERR_RECEIVE_RSP_FAILED:
                describe = "ERR_RECEIVE_RSP_FAILED";
                break;
        }
        return describe;
    }

    //  ================= 交通银行错误码定义 ===============
    
    public final static String ERR_DEVICE_DISCONNECTED = "-0000"; //设备连接断开
    
    
    //listenDeviceStatus
//    public final static String ERR_DEVICE_LOW_POWER = "-0601"; // 设备电量不足
    public final static String ERR_MODULE_PINPAD_KEY = "-0602"; //密码键盘模块异常
    public final static String ERR_MODULE_MAG_CARD = "-0603"; //磁条卡模块异常
    public final static String ERR_MODULE_NFC_CARD = "-0604"; // IC非接模块异常
    public final static String ERR_MODULE_IC_CARD = "-0605"; //IC接触模块异常
    public final static String ERR_MODULE_ID_CARD = "-0606"; //身份证模块异常
    public final static String ERR_MODULE_FINGET = "-0607"; //指纹模块异常
//    public final static String ERR_DEVICE_LCD = "-0608";   //液晶屏模块异常 (不能获取)
//    
//    //getSerialNo
    public final static String ERR_GET_SN_FAIL = "-0701"; //获取序列号失败
//    public final static String ERR_GET_SN_TIMEOUT = "-0702"; //获取序列号超时
//    
//    //setCodeName
    public final static String ERR_SET_BTNAME_FAIL = "-0801"; // 设置蓝牙名称失败
//    public final static String ERR_SET_BTNAME_TIMEOUT = "-0802"; //设置蓝牙名称超时
//    
//    //getCodeName
    public final static String ERR_GET_BTNAME_FAIL = "-0901"; //获取蓝牙名称失败
//    public final static String ERR_GET_BTNAME_TIMEOUT = "-0902"; //获取蓝牙名称超时
//    
//    //ReadBankCardInfo
    public final static String ERR_READ_MAG_CARD = "-1001"; //读取磁条卡失败  
    public final static String ERR_READ_IC_CARD = "-1002"; //IC接触读取失败
    public final static String ERR_READ_NFC_CARD = "-1003"; //IC非接读取失败
//    public final static String ERR_NO_BANK_CARD = "-1004"; //未放置银行卡
    public final static String ERR_READ_BANKCARD_TIMEOUT = "-1005"; //读取超时
    public final static String ERR_CARD_NOT_SUPPORT = "-1006"; //20200923新增 不支持卡读取（AE卡）
//    
//    //ReadIDCardInfo
    public final static String ERR_READ_IDCARD_FAIL = "-1101"; //读取身份证失败
    public final static String ERR_NO_IDCARD = "-1102"; //未放置身份证
    public final static String ERR_IDCARD_IMAGE_PARSE = "-1103"; //身份证图片解析错误
    public final static String ERR_READ_IDCARD_TIMEOUT = "-1104"; //身份证读取超时
//    
//    //getPin 获取密码
    public final static String ERR_PINPAD_INPUT_CANCEL = "-1201"; //用户取消输入
    public final static String ERR_TWO_PASSWORD_NOT_SAME = "-1202"; //密码输入不一致
//    public final static String ERR_PWD_LESS_SIX = "-1203"; //输入位数不足6位
    public final static String ERR_WORKKEY_ENCRYPT = "-1204"; //工作密钥加密异常
    public final static String ERR_GET_KEY_INPUT = "-1205"; //获取按键输入错误
    public final static String ERR_PINPAD_INPUT_TIMEOUT = "-1206"; //密码输入超时
    public final static String ERR_NO_WORK_KEY = "-1209";//未找到当前国际/国密加密模式下的工作密钥
    
    //getPinNew 
    public final static String ERR_NO_WORK_KEY_NEW = "-2507";//未找到当前国际/国密加密模式下的工作密钥
    
//    
//    //getFingerCode 
//    public final static String ERR_FINGER_PUT_TIME_SHORT = "-1301"; //放置时间过短
    public final static String ERR_FINGER_READ_FAIL = "-1302";  //指纹读取失败
    public final static String ERR_FINGER_READ_TIMEOUT = "-1303";  //读取指纹超时
//    
//    //captureFingerCode
//    public final static String ERR_FINGERCODE_PUT_TIME_SHORT = "-1401"; //放置时间过短
//    public final static String ERR_FINGERCODE_READ_FAIL = "-1402"; //指纹采集失败
//    public final static String ERR_FINGERCODE_NON_PUT = "-1403"; //未放置手指
//    public final static String ERR_FINGERCODE_READ_TIMEOUT = "-1404"; //采集指纹超时
//    
//    //printDataString
    public final static String ERR_PRINTER_CONNECT_FAIL = "-1501"; //连接打印机失败 
    public final static String ERR_PRINTER_DATA_PARSE_FAIL = "-1502"; //打印数据解析错误
//    public final static String ERR_PRINTER_NO_PAPER = "-1503"; //打印机缺纸
//    public final static String ERR_PRINTER_LOW_POWER = "-1504"; //打印机电量低
//    public final static String ERR_PRINTER_STATUS = "-1505"; //打印机状态异常
//    public final static String ERR_PRINTER_PRINT_TIMEOUT = "-1506"//打印超时
//    
//    //printDataBitmap
//    public final static String ERR_PRINTBMP_CONNECT_FAIL = "-1601"; //连接打印机失败
//    public final static String ERR_PRINTERBMP_IMAGE_PARSE_FAIL = "-1602"; //图片数据解析错误
//    public final static String ERR_PRINTERBMP_NO_PAPER = "-1603"; //
//    public final static String ERR_PRINTERBMP_LOW_POWER = "-1604"; //打印机电量低
//    public final static String ERR_PRINTERBMP_STATUS = "-1605"; //打印机状态异常
//    public final static String ERR_PRINTERBMP_PRString_TIMEOUT = "-1606"; //打印超时
//    
//    //ReadIcCardTags
//    public final static String ERR_IC_PWOER_ON = "-1701"; //IC卡上电失败
//    public final static String ERR_IC_PWOER_OFF = "-1702"; //IC卡下电失败
//    public final static String ERR_IC_NO_PWOER_ON = "-1703"; //IC卡未上电
//    public final static String ERR_IC_DATA_COMMUNICATE = "-1704"; //数据通讯错误
//    public final static String ERR_IC_APDU_INTERACT = "-1705"; //APDU交互错误
//    public final static String ERR_IC_OUTER_CONFIRM = "-1706"; //IC卡外部认证错误
//    public final static String ERR_IC_55AREA_PARSE = "-1707"; //55域标签解析错误
    public final static String ERR_IC_55AREA_GET_TIMEOUT = "-1708"; //获取55域数据超时
//    
//    // validateARPC
//    public final static String ERR_IC_ARPC_PWOER_ON = -1801; //IC卡上电失败
//    public final static String ERR_IC_ARPC_PWOER_OFF = -1802; //IC卡下电失败
//    public final static String ERR_IC_ARPC_NO_PWOER_ON = -1803; //IC卡未上电
//    public final static String ERR_IC_ARPC_DATA_COMMUNICATE = -1804; //数据通讯错误
//    public final static String ERR_IC_ARPC_APDU_INTERACT = -1805; //APDU交互错误
//    public final static String ERR_IC_ARPC_OUTER_CONFIRM = -1806; //IC卡外部认证错误
//    public final static String ERR_IC_ARPC_SCRIPT_PARSE = -1807; //写卡脚本解析错误
    public final static String ERR_IC_ARPC_SCRIPT_EXECUTE = "-1808"; //执行脚本错误
    public final static String ERR_IC_ARPC_SCRIPT_FAIL = "-1810"; //脚本执行失败
//    public final static String ERR_IC_ARPC_WRITE_CARD_TIMEOUT = -1809; //写卡超时
//    
//    //getPublicKey
    public final static String ERR_GET_PUBLIC_KEY_FAIL = "-1901"; //公钥获取失败
//    public final static String ERR_GET_PUBLIC_KEY_TIMEOUT = -1902; //公钥获取超时
//    
//    //loadMainKey
    public final static String ERR_LOAD_MAIN_KEY_FAIL = "-2001"; //主密钥下载异常
//    public final static String ERR_CREATE_CHECK_VALUE = -2002; //校验值生成错误 
//    public final static String ERR_LOAD_MAINKEY_TIMEOUT = -2003; //主密钥下载超时
//    
//  //loadWorkKey
    public final static String ERR_LOAD_WORK_KEY_FAIL = "-2101"; //工作密钥下载异常
//    public final static String ERR_CREATE_CHECK_VALUE_WORKKEY = -2102; //校验值生成错误 
//    public final static String ERR_LOAD_WORKKEY_TIMEOUT = -2103; //主密钥下载超时
//    
    //getPrinterStatus
    public final static int ERR_PRINTER_HAS_CONNECTED = 0; //打印机已连接
    public final static int ERR_PRINTER_HAS_DISCONNECTED = 1; //打印机断开连接
//    public final static int ERR_PRINTER_LOWPOWER = 2; //打印机电量低
    
    
    
}
